﻿
namespace NamedBinaryTag
{
	/// <summary>
	/// Defines a Tag in the Named Binary Tag format.
	/// </summary>
	public interface ITag
	{
		/// <summary>
		/// Obtains the tag type id.
		/// </summary>
		byte TagType
		{
			get;
		}

		/// <summary>
		/// Obtains or defines the tag Name.
		/// </summary>
		string Name
		{
			get;
			set;
		}

		/// <summary>
		/// Reads the current tag data from the specified <see cref="System.IO.BinaryReader"/>.
		/// </summary>
		/// <param name="input">The <see cref="System.IO.BinaryReader"/> from which to read.</param>
		void Read(System.IO.BinaryReader input);

		/// <summary>
		/// Writes the current tag data to the specified <see cref="System.IO.BinaryWriter"/>.
		/// </summary>
		/// <param name="output">The <see cref="System.IO.BinaryWriter"/> in which to write.</param>
		void Write(System.IO.BinaryWriter output);
	}
}
